Conversation
Not all ANSI encodings can represent accented Latin characters. For non-representable strings, enc2native() may substitute a different character (observed: "o" instead of "o with an umlaut), which fails a later comparison of the file name with the original, non-converted string.
Test 1164.1 should pass with UTF-8 encoded strings without converting them to the native encoding.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7681 +/- ##
=======================================
Coverage 99.04% 99.04%
=======================================
Files 87 87
Lines 17031 17031
=======================================
Hits 16868 16868
Misses 163 163 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Technically, lin-rel-vanilla currently tests with Testing with |

Tests
1966.*failed on my Windows 7 VM where I testdata.tablewith old versions of R.öcannot be represented in CP1251, andenc2native()converted it to a plain unaccentedo. If the characters cannot be represented in the ANSI encoding, we might as well skip the tests. (What if it returnsNAor?on a different system?)Test
1164.1shouldn't require the characters to be represented in the native encoding, because it only uses UTF-8 and Latin-1. Bothmatch()andchmatch()offer a strong enough guarantee. Tested on the same Windows 7 VM, and also usingLC_ALL=zh_CN.gb2312 luit R CMD check(GB2312 doesn't haveäorß) andLC_ALL=Con GNU/Linux.